﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ModuloCozinha
{
    public partial class PedidoAtualizarForm : Form
    {
        private int id = 0;
        private string descricao = "Default";
        private string status = "Default";
        
        public PedidoAtualizarForm()
        {
            InitializeComponent();
        }

        public PedidoAtualizarForm(string nome, string status, string id)
        {
            InitializeComponent();
            this.id = int.Parse(id);
            this.descricao = nome;
            this.status = status;
        }

        private void PedidoAtualizarForm_Load(object sender, EventArgs e)
        {
            descricaoTB.Text = descricao;
            statusCB.SelectedItem = status;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            WSsiar.ServicosSIARSoapClient ws = new WSsiar.ServicosSIARSoapClient();
            ws.PedidoDeletar(id);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            WSsiar.ServicosSIARSoapClient ws = new WSsiar.ServicosSIARSoapClient();
            ws.PedidoAtualizar(id, statusCB.SelectedItem.ToString());
        }
    }
}
